home *** CD-ROM | disk | FTP | other *** search
/ Shareware Super Platinum 8 / Shareware Super Platinum 8.iso / mac / DATABASE / SUBMGR.ZIP;1 / SUBMGR.SRC < prev    next >
Encoding:
Text File  |  1991-12-17  |  12.8 KB  |  283 lines

  1. dXREF - dBASE III Cross Reference Program Version 1.01 [8/16/86]
  2.              Copyright (C) 1986 by LSP, Inc.
  3.  
  4. File: NEWSMGR                  Tuesday 17 December 1991       Page No: 1
  5.  
  6.   1 set echo off
  7.   2 set talk off
  8.   3 set bell off
  9.   4 set status off
  10.   5 set message to 21 center
  11.   6 set wrap on
  12.   7 set color to n/n
  13.   8 clear
  14.   9 set color to w/b+
  15.  10 @ 9,18 to 11,59 double
  16.  11 set color to w+*/b+
  17.  12 @10,19 say "    Initializing, Please Standby ...    "
  18.  13 erase patron.ntx
  19.  14 erase sublist.ntx
  20.  15 use patron
  21.  16 delete all for len(ltrim(name)) = 0
  22.  17 pack
  23.  18 index on state+city+name to patron
  24.  19 index on pat_number to patnum
  25.  20 close all
  26.  21 use sublist
  27.  22 delete all for len(ltrim(name)) = 0
  28.  23 pack
  29.  24 index on state+city+name to sublist
  30.  25 index on sub_number to subnum
  31.  26 close all
  32.  27 option1 =  '    1. Print Subscriber Labels              '
  33.  28 option2 =  '    2. Print Advertiser Label(s)            '
  34.  29 option3 =  '    3. Find Individual Subscriber Entry     '
  35.  30 option4 =  '    4. Find Commercial Advertiser Entry     '
  36.  31 option5 =  '    5. Add Individual Subscriber(s)         '
  37.  32 option6 =  '    6. Add Commercial Advertiser(s)         '
  38.  33 option7 =  '    7. Delete Individual Subscriber         '
  39.  34 option8 =  '    8. Delete Commercial Advertiser         '
  40.  35 option9 =  '    9. Return to Operating System           '
  41.  36 version =  '              VERSION 1.0B                  '
  42.  37 menuchoice = 1
  43.  38 do while .t.
  44.  39 |    close all
  45.  40 |    clear
  46.  41 |    counter = 0
  47.  42 |    set color to g+/g
  48.  43 |    @ 3,21 to 6,58 double
  49.  44 |    set color to gr+/n
  50.  45 |    @ 4,22 SAY '    Newspaper Management Program    '
  51.  46 |    @ 5,22 say '(C)1991, C & K. All Rights Reserved.'
  52.  47 |    set color to bg+/b+,w+/r,n/n
  53.  48 |    @ 8,17 to 18,62
  54.  49 |    @18,29 to 20,49
  55.  50 |    @ 9,18 prompt '&option1' message "Print Mailing Labels for Paid/Unpaid Subscribers"
  56.  51 |    @10,18 prompt '&option2' message "Print Mailing Labels for One/All Commercial Accounts"
  57.  52 |    @11,18 prompt '&option3' message "Find or Edit Subscriber Record(s) in Database"
  58.  53 |    @12,18 prompt '&option4' message "Find or Edit Advertiser Record(s) in Database"
  59. File: NEWSMGR                  Tuesday 17 December 1991       Page No: 2
  60.  
  61.  54 |    @13,18 prompt '&option5' message "Add Subscriber(s) to Database"
  62.  55 |    @14,18 prompt '&option6' message "Add Advertiser(s) to Database"
  63.  56 |    @15,18 prompt '&option7' message "Delete Subscriber From Database"
  64.  57 |    @16,18 prompt '&option8' message "Delete Advertiser From Database"
  65.  58 |    @17,18 prompt '&option9' message "EXIT THIS PROGRAM!"
  66.  59 |    set color to gr+/n
  67.  60 |    @23,18 say '&version'
  68.  61 |    set color to w+*/b+,rb+/r+,n/n
  69.  62 |    @19,30 say ' Select Option 1-9 '
  70.  63 |    set color to bg+/b+,w+/r,n/n
  71.  64 |    menu to menuchoice
  72.  65 |    do case
  73.  66 |    |    case menuchoice = 1
  74.  67 |    |    |    clear
  75.  68 |    |    |    @10,0 say ' '
  76.  69 |    |    |    accept "    Print Labels for (P)aid, (U)npaid, or (E)xpired Subscribers? (P/U/E) " to paidup
  77.  70 |    |    |    if (paidup = 'P' .or. paidup = 'p')
  78.  71 |    |    |    |    @row()+2,4 say 'Sending Paid Subscriber Labels to Printer, Please Wait ...'
  79.  72 |    |    |    |    @row()+2,4 say ' '
  80.  73 |    |    |    |    use sublist index sublist
  81.  74 |    |    |    |    reindex
  82.  75 |    |    |    |    label form sublist for paid_sub .and. date() < end_sub to printer noconsole sample
  83.  76 |    |    |    endif
  84.  77 |    |    |    if (paidup = 'U' .or. paidup = 'u')
  85.  78 |    |    |    |    @row()+2,4 say 'Sending Unpaid Subscriber Labels to Printer, Please Wait ...'
  86.  79 |    |    |    |    @row()+2,4 say ' '
  87.  80 |    |    |    |    use sublist index sublist
  88.  81 |    |    |    |    reindex
  89.  82 |    |    |    |    label form sublist for .not. paid_sub to printer noconsole sample
  90.  83 |    |    |    endif
  91.  84 |    |    |    if (paidup = 'E' .or. paidup = 'e')
  92.  85 |    |    |    |    @row()+2,4 say 'Sending Expired Subscriber Labels to Printer, Please Wait ...'
  93.  86 |    |    |    |    @row()+2,4 say ' '
  94.  87 |    |    |    |    use sublist index sublist
  95.  88 |    |    |    |    reindex
  96.  89 |    |    |    |    label form sublist for end_sub < date() to printer noconsole sample
  97.  90 |    |    |    endif
  98.  91 |    |    case menuchoice = 2
  99.  92 |    |    |    clear
  100.  93 |    |    |    @10,0 say ' '
  101.  94 |    |    |    accept "    Print Labels for (O)ne or (A)ll Commercial Advertisers? (O/A)" to oneorall
  102.  95 |    |    |    if (oneorall = 'O' .or. oneorall = 'o')
  103.  96 |    |    |    |    accept "                    Enter Advertiser Number -> " to patnumber
  104.  97 |    |    |    |    use patron index patron
  105.  98 |    |    |    |    reindex
  106.  99 |    |    |    |    locate for '&patnumber' $ pat_number
  107. 100 |    |    |    |    if .not. found()
  108. 101 |    |    |    |    |    @row()+2,0 say 'Advertiser Number Not Found, Please Recheck and'
  109. 102 |    |    |    |    |    wait
  110. 103 |    |    |    |    else
  111. 104 |    |    |    |    |    clear
  112. 105 |    |    |    |    |    @10,0 say ' '
  113. 106 |    |    |    |    |    display space(20)+upper(name) off
  114. File: NEWSMGR                  Tuesday 17 December 1991       Page No: 3
  115.  
  116. 107 |    |    |    |    |    display space(20)+upper(address1) off
  117. 108 |    |    |    |    |    display space(20)+upper(address2) off
  118. 109 |    |    |    |    |    display space(20)+upper(rtrim(city))+', '+upper(state)+'  '+ zip_4 off
  119. 110 |    |    |    |    |    @row()+2,0 say ' '
  120. 111 |    |    |    |    |    accept "                     Correct? (Y/N) " to answer
  121. 112 |    |    |    |    |    if (answer = "Y" .or. answer = "y")
  122. 113 |    |    |    |    |    |    label form patron next 1 to printer noconsole sample
  123. 114 |    |    |    |    |    endif
  124. 115 |    |    |    |    endif
  125. 116 |    |    |    endif
  126. 117 |    |    |    if (oneorall = 'A' .or. oneorall = 'a')
  127. 118 |    |    |    |    @row()+2,4 say 'Sending All Commercial Advertiser Labels to Printer, Please Wait ...'
  128. 119 |    |    |    |    use patron index patron
  129. 120 |    |    |    |    reindex
  130. 121 |    |    |    |    label form patron to printer noconsole sample
  131. 122 |    |    |    endif
  132. 123 |    |    case menuchoice = 3
  133. 124 |    |    |    clear
  134. 125 |    |    |    use sublist index sublist
  135. 126 |    |    |    reindex
  136. 127 |    |    |    do zerochk
  137. 128 |    |    |    if counter <> 0
  138. 129 |    |    |    |    clear
  139. 130 |    |    |    |    @10,0 say ' '
  140. 131 |    |    |    |    accept '                    Enter Subscriber Number -> ' to subnumber
  141. 132 |    |    |    |    locate for '&subnumber' $ sub_number
  142. 133 |    |    |    |    if .not. found()
  143. 134 |    |    |    |    |    @row()+2,0 say 'Subscription Number Not Found. Full Database Available!'
  144. 135 |    |    |    |    |    wait
  145. 136 |    |    |    |    |    clear
  146. 137 |    |    |    |    |    browse(5,0,17,79)
  147. 138 |    |    |    |    else
  148. 139 |    |    |    |    |    clear
  149. 140 |    |    |    |    |    set format to sublist
  150. 141 |    |    |    |    |    read
  151. 142 |    |    |    |    endif
  152. 143 |    |    |    endif
  153. 144 |    |    case menuchoice = 4
  154. 145 |    |    |    clear
  155. 146 |    |    |    use patron index patron
  156. 147 |    |    |    reindex
  157. 148 |    |    |    do zerochk
  158. 149 |    |    |    if counter <> 0
  159. 150 |    |    |    |    clear
  160. 151 |    |    |    |    @10,0 say ' '
  161. 152 |    |    |    |    accept '                    Enter Advertiser Number -> ' to patnumber
  162. 153 |    |    |    |    locate for '&patnumber' $ pat_number
  163. 154 |    |    |    |    if .not. found()
  164. 155 |    |    |    |    |    @row()+2,0 say 'Advertiser Number Not Found. Full Database Available!'
  165. 156 |    |    |    |    |    wait
  166. 157 |    |    |    |    |    clear
  167. 158 |    |    |    |    |    browse(5,0,17,79)
  168. 159 |    |    |    |    else
  169. File: NEWSMGR                  Tuesday 17 December 1991       Page No: 4
  170.  
  171. 160 |    |    |    |    |    clear
  172. 161 |    |    |    |    |    set format to patron
  173. 162 |    |    |    |    |    read
  174. 163 |    |    |    |    endif
  175. 164 |    |    |    endif
  176. 165 |    |    case menuchoice = 5
  177. 166 |    |    |    clear
  178. 167 |    |    |    @10,0 say ' '
  179. 168 |    |    |    accept '    Are You Sure That You Want to Add an Additional Subscriber? (Y/N) ' to answer
  180. 169 |    |    |    if (answer = 'y' .or. answer = 'Y')
  181. 170 |    |    |    |    clear
  182. 171 |    |    |    |    use sublist index subnum
  183. 172 |    |    |    |    reindex
  184. 173 |    |    |    |    set format to sublist
  185. 174 |    |    |    |    goto bottom
  186. 175 |    |    |    |    store str(val(sub_number)+val('1'),10,0) to sub
  187. 176 |    |    |    |    append blank
  188. 177 |    |    |    |    replace sub_number with sub
  189. 178 |    |    |    |    read
  190. 179 |    |    |    endif
  191. 180 |    |    case menuchoice = 6
  192. 181 |    |    |    clear
  193. 182 |    |    |    @10,0 say ' '
  194. 183 |    |    |    accept '    Are You Sure That You Want to Add an Additional Advertiser? (Y/N) ' to answer
  195. 184 |    |    |    if (answer = 'y' .or. answer = 'Y')
  196. 185 |    |    |    |    clear
  197. 186 |    |    |    |    use patron index patnum
  198. 187 |    |    |    |    reindex
  199. 188 |    |    |    |    set format to patron
  200. 189 |    |    |    |    goto bottom
  201. 190 |    |    |    |    store str(val(pat_number)+val('1'),10,0) to pat
  202. 191 |    |    |    |    append blank
  203. 192 |    |    |    |    replace pat_number with pat
  204. 193 |    |    |    |    read
  205. 194 |    |    |    endif
  206. 195 |    |    case menuchoice = 7
  207. 196 |    |    |    clear
  208. 197 |    |    |    use sublist index sublist
  209. 198 |    |    |    reindex
  210. 199 |    |    |    @10,0 say ' '
  211. 200 |    |    |    accept '                    Enter Subscriber Number -> ' to subnumber
  212. 201 |    |    |    locate for '&subnumber' $ sub_number
  213. 202 |    |    |    if .not. found()
  214. 203 |    |    |    |    @row()+2,0 say 'Subscription Number Not Found. Please Recheck And'
  215. 204 |    |    |    |    wait
  216. 205 |    |    |    else
  217. 206 |    |    |    |    clear
  218. 207 |    |    |    |    @10,0 say ' '
  219. 208 |    |    |    |    display space(20)+upper(name) off
  220. 209 |    |    |    |    display space(20)+upper(address1) off
  221. 210 |    |    |    |    display space(20)+upper(address2) off
  222. 211 |    |    |    |    display space(20)+upper(rtrim(city))+', '+upper(state)+'  '+ zip_4 off
  223. 212 |    |    |    |    @row()+2,0 say ' '
  224. File: NEWSMGR                  Tuesday 17 December 1991       Page No: 5
  225.  
  226. 213 |    |    |    |    accept "                    Delete This Record? (Y/N) " to answer
  227. 214 |    |    |    |    if (answer = "Y" .or. answer = "y")
  228. 215 |    |    |    |    |    delete
  229. 216 |    |    |    |    |    pack
  230. 217 |    |    |    |    |    @row()+2,0 say 'Subscriber Record Has Been Deleted'
  231. 218 |    |    |    |    |    wait
  232. 219 |    |    |    |    endif
  233. 220 |    |    |    endif
  234. 221 |    |    case menuchoice = 8
  235. 222 |    |    |    clear
  236. 223 |    |    |    use patron index patron
  237. 224 |    |    |    reindex
  238. 225 |    |    |    @10,0 say ' '
  239. 226 |    |    |    accept '                    Enter Advertiser Number -> ' to patnumber
  240. 227 |    |    |    locate for '&patnumber' $ pat_number
  241. 228 |    |    |    if .not. found()
  242. 229 |    |    |    |    @row()+2,0 say 'Advertiser Number Not Found. Please Recheck And'
  243. 230 |    |    |    |    wait
  244. 231 |    |    |    else
  245. 232 |    |    |    |    clear
  246. 233 |    |    |    |    @10,0 say ' '
  247. 234 |    |    |    |    display space(20)+upper(name) off
  248. 235 |    |    |    |    display space(20)+upper(address1) off
  249. 236 |    |    |    |    display space(20)+upper(address2) off
  250. 237 |    |    |    |    display space(20)+upper(rtrim(city))+', '+upper(state)+'  '+ zip_4 off
  251. 238 |    |    |    |    @row()+2,0 say ' '
  252. 239 |    |    |    |    accept "                    Delete This Record? (Y/N) " to answer
  253. 240 |    |    |    |    if (answer = "Y" .or. answer = "y")
  254. 241 |    |    |    |    |    delete
  255. 242 |    |    |    |    |    pack
  256. 243 |    |    |    |    |    @row()+2,0 say 'Advertiser Record Has Been Deleted'
  257. 244 |    |    |    |    |    wait
  258. 245 |    |    |    |    endif
  259. 246 |    |    |    endif
  260. 247 |    |    case menuchoice = 9
  261. 248 |    |    |    clear
  262. 249 |    |    |    @0,0 say "…ÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕª"
  263. 250 |    |    |    @1,0 say "∫ Returning To Operating System ∫"
  264. 251 |    |    |    @2,0 say "∫      Thanks From C & K        ∫"
  265. 252 |    |    |    @3,0 say "»ÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕº"
  266. 253 |    |    |    return
  267. 254 |    endcase
  268. 255 |    close all
  269. 256 enddo
  270. File: ZEROCHK                  Tuesday 17 December 1991       Page No: 6
  271.  
  272.   1 count to counter while .not. eof()
  273.   2 if counter = 0
  274.   3 |    clear
  275.   4 |    @ 9,20 say "…ÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕª"
  276.   5 |    @10,20 say "∫ No Records Established in This Database ∫"
  277.   6 |    @11,20 say "∫         Please Add Records First!       ∫"
  278.   7 |    @12,20 say "»ÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕº"
  279.   8 |    @14,20 say "          Press <CR> to Continue ..        "
  280.   9 |    wait ""
  281.  10 endif
  282.  11 return
  283.